import { http } from '@/utils/http/axios';

/**
 * @description: 角色列表
 */
export function getRoleList(params) {
  return http.request({
    url: '/sys/role',
    method: 'GET',
    params,
  });
}
/**
 * @description: 角色下拉框列表
 */
export function getRoleOptionList(params) {
  return http.request({
    url: '/sys/role/optionSelect/',
    method: 'GET',
    params,
  });
}
/**
 * @description: 角色详情
 */
export function getRoleInfo(params) {
  return http.request({
    url: '/sys/role/info',
    method: 'GET',
    params,
  });
}
/**
 * @description: 角色新增
 */
export function createRole(data) {
  return http.request({
    url: '/sys/role',
    method: 'POST',
    data,
  });
}
/**
 * @description: 角色修改
 */
export function updateRole(data) {
  return http.request({
    url: '/sys/role',
    method: 'PUT',
    data,
  });
}
/**
 * @description: 角色删除
 */
export function deleteRole(params) {
  return http.request({
    url: '/sys/role',
    method: 'DELETE',
    params,
  });
}
